<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header('新增红名单号码')" />
	<th:block th:include="include :: select2-css" />
</head>
<body>
    <div class="main-content">
        <form id="form-red-add" class="form-horizontal">
            <input id="flagInt" name="flagInt" type="hidden" value="0"/>
            <input id="flagString" name="flagString" type="hidden" value=""/>
            <input id="spareInt" name="spareInt" type="hidden" value="0"/>
            <input id="spareString" name="spareString" type="hidden" value=""/>
            <h4 class="form-header h4">基本信息</h4>
            <div class="row">
            	<div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label is-required">电话号码：</label>
                        <div class="col-sm-8">
                            <input name="telNo" placeholder="请输入电话号码" class="form-control" type="text" maxlength="30" required>
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label">机主：</label>
                        <div class="col-sm-8">
                            <div class="input-group">
                            	<input name="telName"   type="text" placeholder="请输入机主" class="form-control">
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label">解冻时间：</label>
                        <div class="col-sm-8">
                            <div class="input-group">
                                <input type="text" class="time-input" style="border-radius: 4px;border: 1px solid #ddd;padding-left: 10px;height: 30px" id="startTime" placeholder="解冻时间" name="redTime"/>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label">所在地：</label>
                        <div class="col-sm-8">
                            <div class="input-group">
                                <input id="telAddress" name="telAddress" class="form-control" type="text" maxlength="50" placeholder="请输入所在地">
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label is-required">红名单理由：</label>
                        <div class="col-sm-8">
                            <select  onchange="DropChgSendTextOnly(this,'txtBkName');" style="border-radius: 4px;border: 1px solid #ddd;padding-left: 10px;height: 30px" id="ddlReason" name="redCode" class="drpCss">
                                <option value="-1">-请选择-</option><option value="11">多次故意骚扰</option><option value="15">频繁恶意骚扰</option><option value="21">广告营销</option><option value="99">其它：</option>
                            </select><input id="txtBkName" name="redName" class="form-control" type="text" value="" maxlength="100"/>
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label">编辑时间 ：</label>
                        <div class="col-sm-8">
                            <div class="input-group">
                                <input type="text" class="time-input" style="border-radius: 4px;border: 1px solid #ddd;padding-left: 10px;height: 30px" id="timeEdit" placeholder="编辑时间" name="timeEdit"/>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label">编辑人：</label>
                        <div class="col-sm-8">
                            <input id="tbModifyName" name="tbModifyName" placeholder="请输入编辑人" class="form-control" type="text" maxlength="50">
                        </div>
                    </div>
                </div>

            </div>
            <h4 class="form-header h4">其他信息</h4>
            <div class="row">
                <div class="col-sm-12">
                    <div class="form-group">
                        <label class="col-xs-2 control-label">备注：</label>
                        <div class="col-xs-10">
                            <textarea name="remark" maxlength="500" class="form-control" rows="3"></textarea>
                        </div>
                    </div>
                </div>
            </div>
        </form>
    </div>
      
    <div class="row">
        <div class="col-sm-offset-5 col-sm-10">
            <button type="button" class="btn btn-sm btn-primary" onclick="submitHandler()"><i class="fa fa-check"></i>保 存</button>&nbsp;
            <button type="button" class="btn btn-sm btn-danger" onclick="closeItem()"><i class="fa fa-reply-all"></i>关 闭 </button>
        </div>
    </div>
	<th:block th:include="include :: footer" />
	<th:block th:include="include :: select2-js" />
	<script>
	    var prefix = ctx + "system/telNameList";
        
        function submitHandler() {
	        if ($.validate.form()) {
	        	var data = $("#form-red-add").serializeArray();
	        	$.operate.saveTab(prefix + "/addRed", data);
	        }
	    }
        function DropChgSendTextOnly(e,acpId) {
            document.getElementById(acpId).value = e.options[e.selectedIndex].text;
        }

    </script>
</body>
</html>
